﻿using UnityEngine;

public class StoneLevelDir : MonoBehaviour
{
    [Header("父物体")]
    public StoneLevelItem parent;

    //方向
    public bool isUp = false;

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.gameObject.GetComponent<Player>()!=null)
        {
            if(isUp)
            {
                parent.UpMove();
            }
            else
            {
                parent.DownMove();
            }

            AudManager.instance.PlayUIAud(AudManager.instance.uiDic["添加单词"], 1f);
        }
    }
}
